package cn.yitun.chat.yitunservercommonlib.basebean.websock;

import cn.yitun.chat.yituncommonlibutil.lib.YitunJsonUtil;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
public class BaseRequestDto {

    /**
     * 业务代码
     */
    private String messageCode;
    /**
     * 内容
     */
    private String content;
    /**
     * 公司id
     */
    private Long companyId;

    /**
     * 已方id
     */
    private Long sourceId;

    private String ip;

    private int port;

    /**
     * sock 连接的状态  1初始化 0正常收发
     */
    private int connectStatus;

    protected String toJson() {
        return YitunJsonUtil.objectToJson(this) + "\r\n";
    }
}